<template>
  <div class="siteaside-container">
    <template v-if="data">
      <Avatar :url="data && data.avatar" />
      <h1 class="title">{{ data.siteTitle }}</h1>
    </template>

    <Menu />
    <template v-if="data">
      <Contact />
      <p class="footer">
        {{ data.icp }}
      </p>
    </template>

  </div>
</template>

<script>
import Avatar from '@/components/Avatar';
import Menu from './Menu';
import Contact from './Contact';
import { mapState } from 'vuex';
export default {
  components: {
    Avatar,
    Menu,
    Contact,
  },
  computed: {
    ...mapState("setting", ["data"]),
  }
}
</script>

<style lang="less" scoped>
@import '~@/styles/var.less';

.siteaside-container {
  width: 100%;
  height: 100%;
  background: @dark;
  padding: 20px 0;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
}

.avatar-container {
  margin: 0 auto;
}

.footer {
  text-align: center;
  color: @gray;
  font-size: 12px;
}

.title {
  color: #fff;
  text-align: center;
  font-size: 1.2em;
}
</style>